home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Gui4Cli / Tools / FileReq.gc < prev    next >
Encoding:
Gui4CLI script  |  1980-01-03  |  1.7 KB  |  110 lines

  1. G4C
  2.  
  3. ; 1. Set GLOBAL variable $GUI to your gui's name before calling this gui
  4.  
  5. ; 2. Your gui must contain a routine called LoadFile which will deal 
  6. ;    with *FILENAME accordingly. This routine will be called repeatedly
  7. ;    if many file names have been chosen.
  8.  
  9.  
  10. WINBIG 185 16 290 217  'Choose file(s) :'
  11. WinType 11110001
  12. varpath ''
  13.  
  14. BOX 0 0 290 217    in icondrop
  15.  
  16. XONOPEN
  17. lvuse filereq.gc 1
  18. LVDir none
  19. update filereq.gc 2 $$lv.dir      
  20.  
  21. xOnRMB
  22. if $mode = FAV
  23.    lvuse filereq.gc 1
  24.    lvmode DIR
  25.    lvdir #$$lv.dir
  26. endif
  27.  
  28.  
  29. XLISTVIEW 9 5 213 190    "" *FILENAME "" 10 DIR
  30. GADID 1
  31. GADFONT topaz.font 8 000
  32. if $mode = FAV
  33.    mode = ''
  34.    lvmode DIR
  35.    lvdir #$*FILENAME
  36. else
  37.    guiclose filereq.gc
  38.    gosub $*GUI LoadFile
  39. endif
  40.  
  41.  
  42. ; directory hook
  43. xlvdirhook 1
  44. update filereq.gc 2 $*FILENAME       
  45.  
  46.  
  47. ; single click hook
  48. xlvhook 1
  49. update filereq.gc 2 $*FILENAME
  50.  
  51.  
  52. XTEXTIN 9 194 272 18    "" *FILENAME "" 100
  53. GADID 2
  54. guiclose filereq.gc
  55. gosub $*GUI LoadFile
  56.  
  57.  
  58. XBUTTON 224 5 58 14    "Parent"
  59. lvuse filereq.gc 1
  60. LVDir parent
  61. update filereq.gc 2 $$lv.dir      
  62.  
  63.  
  64. XBUTTON 224 19 58 14    "Root"
  65. lvuse filereq.gc 1
  66. LVDir root
  67. update filereq.gc 2 $$lv.dir      
  68.  
  69.  
  70. XBUTTON 224 33 58 14    "Disks"
  71. lvuse filereq.gc 1
  72. LVDir disks
  73. update filereq.gc 2 $$lv.dir      
  74.  
  75.  
  76.  
  77. XBUTTON 224 47 58 14    "All"
  78. lvuse filereq.gc 1
  79. LVDir all
  80. update filereq.gc 2 $$lv.dir      
  81.  
  82.  
  83.  
  84. XBUTTON 224 61 58 14    "None"
  85. lvuse filereq.gc 1
  86. LVDir none
  87. update filereq.gc 2 $$lv.dir      
  88.  
  89. XBUTTON 224 75 58 14    "Fav"
  90. lvuse filereq.gc 1
  91. lvmode TXT
  92. lvchange guis:tools/fav/default
  93. mode = FAV
  94.  
  95.  
  96. XBUTTON 224 153 58 23    "OK"
  97. guiclose filereq.gc
  98. lvuse filereq.gc 1
  99. lvmulti first
  100. while $*FILENAME > ''
  101.    gosub $*GUI LoadFile
  102.    lvmulti next
  103. endwhile
  104.  
  105.  
  106. XBUTTON 224 176 58 17    "Cancel"
  107. guiclose filereq.gc
  108.  
  109.  
  110.